Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support unused dependencies #309

Merged
merged 1 commit into from
Sep 7, 2023
Merged

Support unused dependencies #309

merged 1 commit into from
Sep 7, 2023

Conversation

Patryk27
Copy link
Contributor

@Patryk27 Patryk27 commented Sep 6, 2023

Cargo stashes unused patches into a special section of the Cargo.lock file:

[[patch.unused]]
name = "uuid"
version = "1.4.1"
source = "git+https://github.com/uuid-rs/uuid#50f70278de02c106650b8d6deb325dd59b5f2a24"

... a section that we, currently, don't read.

Ignoring that section causes the build to fail because even if the patch is unused, when the source is unavailable, Cargo tries to fetch it (which, understandably, is not possible inside the sandbox).

This commit extends our logic so that we download both the "used" and "unused" dependencies.

Closes #308.

Cargo stashes unused patches into a special section of the Cargo.lock
file:

```
[[patch.unused]]
name = "uuid"
version = "1.4.1"
source = "git+https://github.com/uuid-rs/uuid#50f70278de02c106650b8d6deb325dd59b5f2a24"
```

... a section that we, currently, don't read.

Ignoring that section causes the build to fail because even if the patch
is unused, when the source is unavailable, Cargo tries to fetch it
(which, understandably, is not possible inside the sandbox).

This commit extends our logic so that we download both the "used" and
"unused" dependencies.

Closes #308.
Copy link
Collaborator

@nmattia nmattia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Patryk27 Patryk27 merged commit 3f976d8 into master Sep 7, 2023
10 checks passed
@Patryk27 Patryk27 deleted the pr-308/unused-patch branch September 7, 2023 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

missing field unused for key patch
2 participants